package com.jeffse.light.stream.core.data.operator;

import com.jeffse.light.stream.core.data.descriptor.operatorDescriptor.OperatorDescriptor;
import com.jeffse.light.stream.core.pojo.OutTag;

import java.io.Serializable;

public interface StreamOperator<KEY, T, O> extends Serializable {
    /**
     * 设置输出流的标识
     * @return
     */
    public OutTag getOutTag();

    public void setOutTag(OutTag outTag);

    /**
     * 变换，记录流程
     * @param functionType
     * @return
     * @throws Exception
     */
    public  StreamOperator transform(String functionType);

    /**
     * 获取 operator 中的第一个算子描述符
     * @return
     */
    public OperatorDescriptor getFirstDescriptor();

}
